//
//  QYRegistViewController.m
//  CarPooling
//
//  Created by Dxc_iOS on 2018/5/14.
//  Copyright © 2018年 代星创. All rights reserved.
//

#import "QYRegistViewController.h"
#import "QYLoginTFView.h"

#import <AssetsLibrary/AssetsLibrary.h>
#import <Photos/Photos.h>
@interface QYRegistViewController ()
<UITextViewDelegate,
UIActionSheetDelegate,
UINavigationControllerDelegate,
UIImagePickerControllerDelegate,
UICollectionViewDelegate,
UICollectionViewDataSource>
{
    CGFloat _itemWH;
    CGFloat _margin;
}
@property (nonatomic,strong) QYLoginTFView *emailTFView;
@property (nonatomic,strong) QYLoginTFView *emailCodeTFView;
@property (nonatomic,strong) UIButton *emailCodeBtn;
@property (nonatomic,strong) QYLoginTFView *phoneTFView;
@property (nonatomic,strong) QYLoginTFView *phoneTFCodeView;
@property (nonatomic,strong) UIButton *phoneTFCodeBtn;
@property (nonatomic,strong) QYLoginTFView *passwordTFView;
@property (nonatomic,strong) QYLoginTFView *passwordTFView2;
@property (nonatomic,strong) UILabel *QRcodeLab;
@property(nonatomic,strong) UIView *backview;
@property(nonatomic,strong)UITextView *textview;
@property(nonatomic,strong)UILabel *titleInfo;
@property(nonatomic,strong)NSMutableArray *selectedPhotos;
@property(nonatomic,strong)NSMutableArray *selectedAssets;
@property (nonatomic, strong) UIImagePickerController *imagePickerVc;
@property (nonatomic, strong) UICollectionView *collectionView;
@property (strong, nonatomic) CLLocation *location;
@end

@implementation QYRegistViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    self.title = @"regist account";
    [self seupRegistUI];
}
-(void)seupRegistUI{
/**
 E-mail
 */
    UILabel *emailLab = [[UILabel alloc] initWithFrame:CGRectMake(20, 80, 100, 25)];
    [self.view addSubview:emailLab];
    emailLab.text = @"E-mail";
    emailLab.font = HDFont(16);
//
    _emailTFView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(emailLab.frame), HDScreenWidth, 40)];
    [self.view addSubview:_emailTFView];
    _emailTFView.secureTextBtnIsHidden = YES;
    _emailTFView.icon.image = IMAGE(@"");
    _emailTFView.textTF.placeholder = @"Please enter phone number or email";
    _emailTFView.textTF.clearsOnBeginEditing = YES;
    _emailTFView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _emailTFView.textTF.font =HDFont(14);
//
   
    _emailCodeTFView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_emailTFView.frame)+10, HDScreenWidth, 40)];
    [self.view addSubview:_emailCodeTFView];
    _emailCodeTFView.secureTextBtnIsHidden = YES;
    _emailCodeTFView.icon.image = IMAGE(@"");
    _emailCodeTFView.textTF.placeholder = @"Please enter phone number ";
    _emailCodeTFView.textTF.clearsOnBeginEditing = YES;
    _emailCodeTFView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _emailCodeTFView.textTF.font =HDFont(14);
//
    _emailCodeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    _emailCodeBtn.frame = CGRectMake(HDScreenWidth-150, CGRectGetMaxY(_emailTFView.frame)+10, 100, 35);
    [self.view addSubview:_emailCodeBtn];
    [_emailCodeBtn setTitle:@"Get code" forState:UIControlStateNormal];
    _emailCodeBtn.backgroundColor = LoginBtnColor;
    [_emailCodeBtn addTarget:self action:@selector(emailCodeBtnClick:) forControlEvents:UIControlEventTouchUpInside];
    _emailCodeBtn.layer.cornerRadius = 6;
    
    
    
/**绑定手机*/
    UILabel *emailCodeLab = [[UILabel alloc] initWithFrame:CGRectMake(20, CGRectGetMaxY(_emailCodeTFView.frame)+20, 250, 25)];
    [self.view addSubview:emailCodeLab];
    emailCodeLab.text = @"Bind phone number";
    emailCodeLab.font = HDFont(16);
//
    _phoneTFView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(emailCodeLab.frame), HDScreenWidth, 40)];
    [self.view addSubview:_phoneTFView];
    _phoneTFView.secureTextBtnIsHidden = YES;
    _phoneTFView.icon.image = IMAGE(@"");
    _phoneTFView.textTF.placeholder = @"Please enter phone number ";
    _phoneTFView.textTF.clearsOnBeginEditing = YES;
    _phoneTFView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _phoneTFView.textTF.font =HDFont(14);
//
    _phoneTFCodeView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_phoneTFView.frame)+10, HDScreenWidth, 40)];
    [self.view addSubview:_phoneTFCodeView];
    _phoneTFCodeView.secureTextBtnIsHidden = YES;
    _phoneTFCodeView.icon.image = IMAGE(@"");
    _phoneTFCodeView.textTF.placeholder = @"Please enter vertification code ";
    _phoneTFCodeView.textTF.clearsOnBeginEditing = YES;
    _phoneTFCodeView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _phoneTFCodeView.textTF.font =HDFont(14);
/**
密码*/
    UILabel *passwordLab = [[UILabel alloc] initWithFrame:CGRectMake(20, CGRectGetMaxY(_phoneTFCodeView.frame)+20, 150, 25)];
    [self.view addSubview:passwordLab];
    passwordLab.text = @"Password";
    passwordLab.font = HDFont(16);
    
    _passwordTFView = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(passwordLab.frame), HDScreenWidth, 40)];
    [self.view addSubview:_passwordTFView];
    _passwordTFView.secureTextBtnIsHidden = NO;
    _passwordTFView.icon.image = IMAGE(@"");
    _passwordTFView.textTF.placeholder = @"Please enter password";
    _passwordTFView.textTF.clearsOnBeginEditing = YES;
    _passwordTFView.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _passwordTFView.textTF.font =HDFont(14);
    //
    _passwordTFView2 = [[QYLoginTFView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(_passwordTFView.frame)+10, HDScreenWidth, 40)];
    [self.view addSubview:_passwordTFView2];
    _passwordTFView2.secureTextBtnIsHidden = NO;
    _passwordTFView2.icon.image = IMAGE(@"");
    _passwordTFView2.textTF.placeholder = @"Please enter password again";
    _passwordTFView2.textTF.clearsOnBeginEditing = YES;
    _passwordTFView2.textTF.clearButtonMode = UITextFieldViewModeAlways;
    _passwordTFView2.textTF.font =HDFont(14);
/**
  //选择并添加二维码图片
 */
    UILabel *QRcodeLab = [[UILabel alloc] initWithFrame:CGRectMake(20, CGRectGetMaxY(_passwordTFView2.frame)+20, 250, 25)];
    [self.view addSubview:QRcodeLab];
    QRcodeLab.text = @"Add Venmo Account QRCode";
    QRcodeLab.font = HDFont(16);
    self.QRcodeLab = QRcodeLab;
   
    
}

-(void)emailCodeBtnClick{
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
